package com.yenlien.traceyun.milk;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
import javax.sql.DataSource;

/**
 * @Date 2022/7/8
 * @Author jiaLong
 * @Descript 德格奶站
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = "com.yenlien.traceyun")  // 扫描 business 内容
@EnableScheduling
public class MilkApp implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(MilkApp.class, args);
    }

    @Autowired
    DataSource dataSource;

    // 查看使用的数据库连接池
    @Override
    public void run(String... args){
        System.out.println("DATASOURCE = " + dataSource);
    }

}
